package com.Ip.advice;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
//@Service
public class Advices{
	public void arround(ProceedingJoinPoint p) throws Throwable{
		System.out.println("a1");
		p.proceed();
		System.out.println("a2");
	}
	public void before(JoinPoint jp) {
		System.out.println("----------前置通知----------");
		System.out.println(jp.getSignature().getName());
	}

	public void after(JoinPoint jp) {
		System.out.println("----------最终通知----------");
	}
	public void exception(JoinPoint jp,Throwable e) {
			e.printStackTrace();  
	}
	public void exception2(JoinPoint jp,int result) {
		System.out.println(result);
		System.out.println("good");
	}
}
